package com.explorati.design_pattern.creational.singleton.example;

public class GlobalNum {

	private static GlobalNum instance = new GlobalNum();
	private int num = 0;
	private GlobalNum(){}
	
	public static GlobalNum getInstance(){
		return instance;
	}
	
	public synchronized int getNum(){
		return ++num;
	}
}
